Field of the Invention
The present invention relates to an image processing apparatus and an image processing method.
Description of the Related Art
A technique for automatically switching between color printing and monochrome (black-and-white) printing has been known (e.g., Japanese Patent Application Laid-Open No. 2007-129449). The technique discussed in Japanese Patent Application Laid-Open No. 2007-129449 will be described in detail below.
A printer driver determines whether a color object is included in red, green, and blue (RGB) document data. If at least one color object is included, the printer driver determines that the RGB document data is color. If no color object is included, the printer driver determines that the RGB document data is monochrome. The printer driver sends the determination result along with the RGB document data to a printer.
Having received the RGB document data, the printer bitmaps the RGB document data. This generates RGB bitmap data.
(1) If the received determination result indicates that the RGB document data is monochrome, the printer converts the generated RGB bitmap data into single-K-color bitmap data, and prints the single-K-color bitmap data. That is, the printer prints the converted single-K-color bitmap data using only K ink or K toner. “K” represents black. In this case, a monochrome printing fee is charged for the printing of the document.
(2) If, on the other hand, the received determination result indicates that the RGB document data is color, the printer determines, in the RGB bitmap data, which pixel is to be printed in cyan, magenta, yellow, and black (CMYK) colors and which pixel is to be printed in a single K color. Specifically, the following processing is performed.
(A) First, the printer generates attribute bitmap data indicating the attribute of an object to which each pixel belongs. The attribute is any one of, for example, “text”, “graphic”, “image”, and “nothing”.
(B) Then, the printer sets an attribute “single K color” for a pixel which has the attribute “text” or “graphic” and in which R=G=B. On the other hand, the printer sets an attribute “CMYK” for other pixels.
(C) The RGB values of the pixel for which the attribute “single K color” has been set are converted into the values of a single K color (C=M=Y=0, and K can be any value), and then, the pixel is printed. Further, the RGB values of the pixel for which the attribute “CMYK” has been set are converted into the values of CMYK colors (at least one of C, M, and Y is not 0 except for the case where R=G=B=255, and K can be any value), and then, the pixel is printed. “C” represents cyan, “M” represents magenta, and “Y” represents yellow.
(D) If there is at least one pixel having the attribute “CMYK”, a color printing fee has been charged for the printing of the document. Further, if all the pixels have the attribute “single K color”, a monochrome printing fee is charged for the printing of the document.
If the printer has not received the monochrome determination result from the printer driver, the printer charges a fee by performing processing similar to the processing in the above (2) and the subsequent steps, that is, the processing performed in the case where the color/monochrome determination result indicates that the RGB document data is color.
According to the above determination method, however, an undesirable color printing fee may be charged in some cases. Such cases will be described using an example illustrated in FIG. 1. FIG. 1 illustrates a document 101, which includes a white image object 102 (although the frame line of the image object 102 is black for illustrative purposes, the image object 102 is actually white), and black text objects 104 and 105. Since the document 101 includes the white image object 102, attribute bitmap data generated from the document 101 includes the attribute “image”. Thus, the printer determines the document 101 as a color document. As a result, a color printing fee has been charged for the printing of such a document, despite the fact that there is no pixel to be printed in color. More specifically, although RGB-to-CMYK conversion is applied to the white image object 102, the obtained values would be C=M=Y=K=0 because, originally, R=G=B=255. Since RGB-to-single-K-color conversion is applied to the black text objects 104 and 105, the obtained values would be C=M=Y=0.